;;; init-rust.el --- Configuration for rust programing -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

(add-hook 'rust-mode-hook #'lsp)
(with-eval-after-load 'rust-mode
  (require 'lsp-rust)

  (setq lsp-rust-server 'rust-analyzer)
  (define-key rust-mode-map (kbd "C-c C-c") #'rust-run))

(with-eval-after-load 'rust-ts-mode
  (require 'rust-mode)
  (setq rust-ts-mode-hook rust-mode-hook))

(provide 'init-rust)
;;; init-rust.el ends here
